<template>
  <div>
    <div class="mtb20">操作日志（共{{ tableParams.total }}条）</div>
    <zm-table-data
      :data="tableParams.data"
      :columns="columns"
      :fetch="loadList"
      :table-params="tableParams"
    ></zm-table-data>
  </div>
</template>

<script>
import tableMixin from '@/mixins/zmTableMixin'
import saleOrderApi from '@/api/src/saleOrder'
import { operatColumns } from './const'

export default {
  mixins: [tableMixin],
  props: {
    infoData: {
      type: Object,
      default () {
        return {}
      }
    }
  },
  data () {
    return {}
  },
  computed: {
    columns () {
      return operatColumns(this)
    }
  },
  created () {},
  methods: {
    async loadList () {
      const res = await saleOrderApi.getLogPageList(this.assignQuery({orderId: this.infoData.id}))
      this.initialTableData(res.list, res.count)
    }
  }
}
</script>
